﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x0200004E RID: 78
	public class CharFormatter : IMessagePackFormatter<char>
	{
		// Token: 0x06000127 RID: 295 RVA: 0x00004CAF File Offset: 0x000030AF
		private CharFormatter()
		{
		}

		// Token: 0x06000128 RID: 296 RVA: 0x00004CB7 File Offset: 0x000030B7
		public int Serialize(ref byte[] bytes, int offset, char value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteChar(ref bytes, offset, value);
		}

		// Token: 0x06000129 RID: 297 RVA: 0x00004CC1 File Offset: 0x000030C1
		public char Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return MessagePackBinary.ReadChar(bytes, offset, out readSize);
		}

		// Token: 0x04000042 RID: 66
		public static readonly CharFormatter Instance = new CharFormatter();
	}
}
